package nus.iss.laps.dao;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

public abstract class DAO {
	
	@Autowired
	protected DataSource dataSource;
	
	protected String query;
	protected JdbcTemplate jdbcTemplate;
	protected String table;
	
	public void setTable(String table)
	{
		this.table = table;
	}
	
	protected String getSelectQuery()
	{
		return "select * from " + table;
	}
	
	protected String getDeleteQuery()
	{
		return "delete from " + table;
	}
}
